unit Procuraclientes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, MemDS, DBAccess, IBC, Grids, DBGrids, StdCtrls;

type
  TFprocuracliente = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    IBCConnection1: TIBCConnection;
    clientes: TIBCQuery;
    clientesCODIGO: TIntegerField;
    clientesNOME: TStringField;
    ds_clientes: TIBCDataSource;
    DBGrid1: TDBGrid;
    procedure Edit1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Fprocuracliente: TFprocuracliente;

implementation

uses Dados;

{$R *.dfm}

procedure TFprocuracliente.Edit1Change(Sender: TObject);
begin
clientes.Close;
clientes.sql.clear;
clientes.sql.add('select codigo, nome from clientes where nome like ' + chr(39) + '%' + edit1.Text + '%' + chr(39) + ' order by nome');
clientes.Open;
//select nome, codigo from clientes where nome like '%C%'
end;

end.
